import HTTP from './axios'
import { Ref } from 'vue'
// 登录
export  function HttpLogin(params: object){
	return HTTP.POST('/login/',params)
}
// 退出登录
export  function HttpLogout(){
	return HTTP.POST('/logout/')
}
// 注册
export  function HttRegister(params: object){
	return HTTP.POST('/register/',params)
}
// 获取验证码
export  function HttpVerificationCode(params?: object){
	return HTTP.POST('/verificationCode/',params)
}
// 修改密码
export  function HttpAlterPassword(params?: object){
	return HTTP.POST('/alterPassword/',params)
}
// 忘记密码
export  function HttpForgetPassword(params?: object){
	return HTTP.POST('/forgetPassword/',params)
}
// 我的发布
export  function HttpMyRelease(){
	return HTTP.GET('/myRelease/')
}
// 删除我的发布
export  function HttpDeleteMyRelease(id:number){
	return HTTP.POST('/deleteMyRelease/'+id)
}
// 我的评论
export  function HttpMyComments(){
	return HTTP.GET('/myComments/')
}

// 收藏与取消收藏
export  function HttpCollection(id:number,params?: object){
	return HTTP.POST('/collection/'+id,params)
}
// 我的收藏
export  function HttpMyCollection(){
	return HTTP.GET('/myCollection/')
}
// 获取个人信息
export  function HttpPersonal(){
	return HTTP.GET('/personal/')
}
// 获取他人信息
export  function HttpGetOtherinfo(params?: object){
	return HTTP.POST('/getOtherinfo/',params)
}
// 获取他人信息
export  function HttpSetUserMoney(params?: object){
	return HTTP.POST('/setUserMoney/',params)
}

// 修改个人信息
export  function HttpPostPersonal(params?: object){
	return HTTP.POST('/personal/',params)
}
// 修改用户分数
export  function HttpAlterScore(params?: object){
	return HTTP.POST('/alterScore/',params)
}
// 上传图片
export  function HttpUpdateImage(img_path:string,params?: object){
	return HTTP.POST('/updateImage/'+img_path,params,true)
}
// 文章发布
export  function HttpArticleRelease(params?: object){
	return HTTP.POST('/articleRelease/',params)
}
// 文章列表
export  function HttpArticleList(page:number,params?: object){
	return HTTP.POST('/articleList/'+page,params)
}
// 文章详情
export  function HttpArticleDetails(id:number){
	return HTTP.GET('/articleDetails/'+id)
}
// 获取评论
export  function HttpComments(id:number){
	return HTTP.GET('/comments/'+id)
}
// 发表评论
export  function HttpPostComments(id:number,params?: object){
	return HTTP.POST('/comments/'+id,params)
}
// 删除评论
export  function HttpDeleteComments(id:number,params?: object){
	return HTTP.POST('/deleteComments/'+id,params)
}
// 发表评论
export  function HttpPostSecondaryComments(id:number,params?: object){
	return HTTP.POST('/secondaryComments/'+id,params)
}
// 新闻列表
export  function HttpNewList(page:number,params?: object){
	return HTTP.POST('/newList/'+page,params)
}
// 内推列表
export  function HttpInterpolateList(page:number,params?: object){
	return HTTP.POST('/interpolateList/'+page,params)
}
// 游戏列表
export  function HttpGameList(page:number,params?: object){
	return HTTP.POST('/gameList/'+page,params)
}
export  function HttpSourceList(page:number,params?: object){
	return HTTP.POST('/sourceList/'+page,params)
}

// 保存游戏记录
export  function HttpGameRecord(params?: object){
	return HTTP.POST('/gameRecord/',params)
}
// 获取人的分数
export  function HttpGameTotalRecord(params?: object){
	return HTTP.POST('/gameTotalRecord/',params)
}

// 查询房间信息
export  function HttpSeachGameRoom(params?: object){
	return HTTP.POST('/seachGameRoom/',params)
}
// 获取当前账户游戏记录
export  function HttpGetGameRecord(){
	return HTTP.GET('/gameRecord/')
}
// 推送消息设置
export  function HttpPushSet(params?: object){
	return HTTP.POST('/pushSet/',params)
}
// 添加职位
export  function HttpJobType(params?: object){
	return HTTP.POST('/jobType/',params)
}
// 查询职位
export  function HttpGetjobType(){
	return HTTP.GET('/jobType/')
}
// 管理
// 用户列表
export  function HttpPersonalList(page:number,params?: object){
	return HTTP.POST('/personalList/'+page,params)
}
// 修改用户权限
export  function HttpReviseUserPermissions(params?: object){
	return HTTP.POST('/reviseUserPermissions/',params)
}
// 文章管理列表
export  function HttpArticleManageList(page:number,params?: object){
	return HTTP.POST('/articleManageList/'+page,params)
}
// 审核文章
export  function HttpReviewArticle(params?: object){
	return HTTP.POST('/reviewArticle/',params)
}
// 问题列表
export  function HttpQuestionList(page:number,params?: object){
	return HTTP.POST('/questionList/'+page,params)
}
// 问题添加
export  function HttpAddQuestion(params?: object){
	return HTTP.POST('/addQuestion/',params)
}
// 修改问题
export  function HttpAlterQuestion(params?: object){
	return HTTP.POST('/alterQuestion/',params)
}
// 删除问题
export  function HttpDeleteQuestion(params?: object){
	return HTTP.POST('/deleteQuestion/',params)
}
// 类别列表
export  function HttpQuestionTypeList(){
	return HTTP.GET('/questionTypeList/')
}
// 添加类别列表
export  function HttpAddQuestionType(params?: object){
	return HTTP.POST('/addQuestionType/',params)
}
// 添加历史面试题
export  function HttpAddQuestionColletion(params?: object){
	return HTTP.POST('/addQuestionColletion/',params)
}
// 删除历史面试题
export  function HttpDeleteQuestionColletion(params?: object){
	return HTTP.POST('/deleteQuestionColletion/',params)
}
// 历史面试题列表
export  function HttpQuestionColletionList(){
	return HTTP.GET('/questionColletionList/')
}
// 部署界面
// 上传zip
export  function HttpUpdateZip(img_path:string,params?: object,onUploadProgress?:any){
	return HTTP.POST('/updateZip/'+img_path,params,true,onUploadProgress)
}
export  function HttpGetUpdateZip(){
	return HTTP.GET('/updateZip/')
}